package com.xoomworks.rsfr.model;

import java.io.Serializable;
import java.util.Date;

/**
 * The persistent class for the UserAuthentication database table.
 */
public class UserAuthentication extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

    private String authToken;

    private Date authTokenExpiration;

    private Date createdOn;

    private byte isExpired;

    private Date modifiedOn;

    // uni-directional many-to-one association to User
    private User user;

    // uni-directional many-to-one association to Application
    private Application application;


    /**
     * Constructor with no fields.
     */
    public UserAuthentication() {
    }

    /**
     * Constructor with specified parameters.
     * @param authToken String.
     * @param authTokenExpiration Date.
     * @param isExpired Byte.
     * @param user User.
     * @param application Application.
     */
    public UserAuthentication(final String authToken, final Date authTokenExpiration,
            final byte isExpired, final User user, final Application application) {
        super();
        this.authToken = authToken;
        this.authTokenExpiration = authTokenExpiration;
        this.isExpired = isExpired;
        this.user = user;
        this.application = application;
    }

    /**
     * Constructor with specified parameters.
     * @param authToken String.
     * @param authTokenExpiration Date.
     * @param user User.
     * @param application Application.
     */
    public UserAuthentication(final String authToken, final Date authTokenExpiration,
            final User user, final Application application) {
        super();
        this.authToken = authToken;
        this.authTokenExpiration = authTokenExpiration;
        this.user = user;
        this.application = application;
    }

    /**
     * Gets authToken.
     * @return authToken String.
     */
    public String getAuthToken() {
        return this.authToken;
    }

    /**
     * Sets authToken.
     * @param authToken String.
     */
    public void setAuthToken(final String authToken) {
        this.authToken = authToken;
    }

    /**
     * Get getAuthTokenExpiration.
     * @return authTokenExpiration Date.
     */
    public Date getAuthTokenExpiration() {
        return this.authTokenExpiration;
    }

    /**
     * Sets getAuthTokenExpiration.
     * @param authTokenExpiration Date.
     */
    public void setAuthTokenExpiration(final Date authTokenExpiration) {
        this.authTokenExpiration = authTokenExpiration;
    }

    /**
     * Gets the date.
     * @return createdOn Date.
     */
    public Date getCreatedOn() {
        return this.createdOn;
    }

    /**
     * Sets the date.
     * @param createdOn Date.
     */
    public void setCreatedOn(final Date createdOn) {
        this.createdOn = createdOn;
    }

    /**
     * Gets if is expired.
     * @return isExpired Byte.
     */
    public byte getIsExpired() {
        return this.isExpired;
    }

    /**
     * Sets if is expired.
     * @param isExpired Byte.
     */
    public void setIsExpired(final byte isExpired) {
        this.isExpired = isExpired;
    }

    /**
     * Gets the date.
     * @return modifiedOn Date
     */
    public Date getModifiedOn() {
        return this.modifiedOn;
    }

    /**
     * Sets the date.
     * @param modifiedOn Date.
     */
    public void setModifiedOn(final Date modifiedOn) {
        this.modifiedOn = modifiedOn;
    }

    /**
     * Gets the user.
     * @return user User.
     */
    public User getUser() {
        return this.user;
    }

    /**
     * Sets the user.
     * @param user User.
     */
    public void setUser(final User user) {
        this.user = user;
    }

    /**
     * Gets the application.
     * @return application Application.
     */
    public Application getApplication() {
        return this.application;
    }

    /**
     * Sets the application.
     * @param application Application.
     */
    public void setApplication(final Application application) {
        this.application = application;
    }

}
